<%#
 Copyright 2008 Steven Barth <steven@midlink.org>
 Copyright 2008-2011 Jo-Philipp Wich <jow@openwrt.org>
 Licensed to the public under the Apache License 2.0.
-%>


<%+header%>

<h2 name="content"><%:Modeminfo%></h2>

<script type="text/javascript">//<![CDATA[
XHR.poll(4, '<%=build_url("admin/modem/data")%>', null,
		function(x, hw)
		{
			// stuff
			if (e = document.getElementById('device'))
                                e.innerHTML = String.format(hw.device);
			if (e = document.getElementById('imei'))
				e.innerHTML = String.format(hw.imei);
			if (e = document.getElementById('firmware'))
				e.innerHTML = String.format(hw.firmware);
			if (e = document.getElementById('iccid'))
				e.innerHTML = String.format(hw.iccid);
			if (e = document.getElementById('imsi'))
				e.innerHTML = String.format(hw.imsi);
			if (e = document.getElementById('chiptemp'))
			 	e.innerHTML = String.format(hw.chiptemp + " &deg;C");

		}
	);
//]]></script>

<fieldset class="cbi-section">
	<legend><%:Hardware Info%></legend>
	<div class="table" width="100%">
		<div class="tr cbi-rowstyle-2">
			<div class="td left" width="25%"><b><%:Device:%></b></div>
			<div class="td left" width="25%" id="device">-</div>
		</div>
		<div class="tr cbi-rowstyle-1">
			<div class="td left" width="25%"><b><%:Firmware:%></b></div>
			<div class="td left" width="25%" id="firmware">-</div>
		</div>
		<div class="tr cbi-rowstyle-2">
			<div class="td left" width="25%"><b><%:IMSI:%></b></div>
			<div class="td left" width="25%" id="imsi">-</div>
		</div>
		<div class="tr cbi-rowstyle-1"> 
			<div class="td left" width="25%"><b><%:ICCID:%></b></div>
			<div class="td left" width="25%" id="iccid">-</div>
		</div>
		<div class="tr cbi-rowstyle-2">
			<div class="td left" width="25%"><b><%:IMEI:%></b></div>
			<div class="td left" width="25%" id="imei">-</div>
		</div>
		<div class="tr cbi-rowstyle-1">
			<div class="td left" width="25%"><b><%:Chiptemp:%></b></div>
			<div class="td left" width="25%" id="chiptemp">-</div>
		</div>
	</div>
</fieldset>


<%+footer%>
